const body = require('koa-better-body');
const options = {
    uploadDir: './upload',
    //keepExtensions: true,
    formLimit: "1kb",
    jsonLimit: "5mb",
    multipart: 'false',
    buffer: 'false',
    textLimit: "1kb",
    handler: function* (ctx, opts) {
        console.log('body');
        // `ctx` is equal to `this` and `app`
        // `opts` is current options object
        // passed to `koa-better-body`
        ctx.body = yield this.request.text(opts.textLimit)
    }
}
module.exports = body(options);